import request from '@/utils/request'

// 查询粮食类型列表
export function listGrainType(query) {
  return request({
    url: '/console/base/grainType/list',
    method: 'get',
    params: query
  })
}

// 查询粮食类型详细
export function getGrainType(id) {
  return request({
    url: '/console/base/grainType/' + id,
    method: 'get'
  })
}

// 新增粮食类型
export function addGrainType(data) {
  return request({
    url: '/console/base/grainType',
    method: 'post',
    data: data
  })
}

// 修改粮食类型
export function updateGrainType(data) {
  return request({
    url: '/console/base/grainType',
    method: 'put',
    data: data
  })
}

// 删除粮食类型
export function delGrainType(id) {
  return request({
    url: '/console/base/grainType/' + id,
    method: 'delete'
  })
}

// 导出粮食类型
export function exportGrainType(query) {
  return request({
    url: '/console/base/grainType/export',
    method: 'get',
    params: query
  })
}
